/*
 * Copyright 2010 Francisco Modesto
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package com.googlecode.gwt.tinyaop.client;

/**
 * This interface represents an invocation in the program.<br>
 */
public interface Invocation {
  /**
   * Reference to the object being intercepted.
   * @return a reference to the object
   */
  public Object getThis();

  /**
   * Method being intercepted
   * @return the method
   */
  public MethodDescriptor getMethod();

  /**
   * Get the arguments as an array object. It is possible to change element values
   * within this array to change the arguments.<br>
   * @return the arguments
   */
  public Object[] getArguments();

  /**
   * Proceeds to the next interceptor in the chain, or if this interceptor was
   * the last, executes the original method.
   * @return the normal output of the method or <code>null</code> if the method
   *     was defined as void.
   */
  public Object proceed();
}
